import {
  filterIndexfieldsAPI,
  crmSearchExpertSaveAPI

} from '@/api/crm/common'

import {
  crmCustomerPoolQueryPoolFieldAPI,
  crmCustomerPoolSaveSearchExpertAPI,
 
} from '@/api/crm/customer'

import FieldSet from '@/components/busComponents/FieldSet'
import {
  mapGetters
} from 'vuex'
import moduleType from '@/utils/modules/moduleType'
export default {
  components: {
    FieldSet
  },

  // 用于弹框形式下的配置和数据传入
  props: {
   
  },

  data() {
    return {
      filterFieldList: [], // 高级筛选字段
      tableHeaderProps: {},
      crmType:[]
    }
  },
  created() {
    this.tableHeaderProps = this.getBaseTableHeaderProps()
  },
  methods: {
    getBaseTableHeaderProps() {
      // 帮助对象
      // const helpObj = this.getHelpObj(this.crmType)

      // 是否展示场景
      // let tabSetShow = false
      // if (this.props) {
      //   tabSetShow = this.props.showScene
      // } else {
      //   if (this.isSeas || ['marketing', 'applet'].includes(this.crmType)) {
      //     tabSetShow = false
      //   } else {
      //     tabSetShow = true
      //   }
      // }

      // 是否展示筛选
      let showFilterView = false
      if (['marketing', 'applet'].includes(this.crmType)) {
        showFilterView = false
      } else if (this.isSeas) {
        showFilterView = !!this.poolId
      } else {
        showFilterView = true
      }

      return {
        props: {
          showFilterView: showFilterView, // 控制是否展示高级筛选
          showExportFields: false // 展示外漏布局
        },
        // filterHeaderProps: {
        //   maxTabCount: this.config.isSelect ? 2 : 5,
        //   tabSetShow: tabSetShow,
        //   searchPlaceholder: {
        //     leads: '线索名称/手机/电话',
        //     customer: '客户名称/手机/电话',
        //     contacts: '联系人姓名/手机/电话',
        //     product: '产品名称',
        //     business: '商机名称',
        //     contract: '客户名称/合同编号/合同名称',
        //     receivables: '客户名称/回款编号',
        //     receivablesPlan: '客户名称/合同编号',
        //     visit: '回访编号',
        //     invoice: '发票号码/客户名称/合同编号',
        //     marketing: '活动名称'
        //   }[this.crmType]
        // },
        filterFormProps: {
          showExport: true, // 控制是否展示外露按钮
          showSaveScene: !this.isSeas, // 控制是否展示保存场景
          help: helpObj ? {
            type: helpObj.type,
            id: helpObj.filterForm
          } : null,
          exportHelp: helpObj ? {
            type: helpObj.type,
            id: helpObj.filterFormExport
          } : null,
          saveRequest: this.isSeas ? crmCustomerPoolSaveSearchExpertAPI : crmSearchExpertSaveAPI,
          saveParams: this.isSeas ? {
            poolId: this.poolId
          } : {
            label: moduleType[this.crmType]
          }
        },
        // sceneSetProps: {
        //   // 场景列表请求
        //   indexRequest: crmSceneSetIndexAPI,
        //   indexParams: {
        //     type: moduleType[this.crmType]
        //   },
        //   // 排序请求
        //   sortRequest: crmSceneSortAPI,
        //   sortParams: {
        //     type: moduleType[this.crmType]
        //   },
        //   // 默认请求
        //   defaultsRequest: crmSceneDefaultsAPI,
        //   // defaultsParams: null,
        //   // 删除请求
        //   deleteRequest: crmSceneDeleteAPI,
        //   // deleteParams: null,
        //   // 字段列表请求
        //   fieldsIndexRequest: filterIndexfieldsAPI,
        //   fieldsIndexParams: {
        //     label: moduleType[this.crmType]
        //   },
        //   // 帮助提示
        //   help: helpObj ? {
        //     type: helpObj.type,
        //     id: helpObj.sceneSet
        //   } : null
        // },
        // sceneCreateProps: {
        //   // 场景编辑请求
        //   updateRequest: crmSceneUpdateAPI,
        //   updateParams: { type: moduleType[this.crmType] },
        //   // 场景新建请求
        //   saveRequest: crmSceneSaveAPI,
        //   saveParams: { type: moduleType[this.crmType] },
        //   // 帮助提示
        //   help: helpObj ? {
        //     type: helpObj.type,
        //     id: helpObj.sceneCreate
        //   } : null
        // }
      }
    },

    /* ------------------------ 高级筛选 ------------------------ */
    /**
     * @description: wk-table-header 筛选字段的获取
     * @param {*}
     * @return {*}
     */
    getFilterFields() {
      return new Promise((resolve) => {
        const params = {}
        if (this.isSeas) {
          params.poolId = this.poolId
        } else {
          params.label = moduleType[this.crmType]
        }

        const request = this.isSeas ? crmCustomerPoolQueryPoolFieldAPI : filterIndexfieldsAPI

        request(params).then(res => {
          res = {
            "code": 0,
            "msg": "success",
            "data": [
                {
                    "fieldId": null,
                    "parentFieldId": null,
                    "label": null,
                    "fieldName": "leadsName",
                    "formType": "text",
                    "name": "线索名称",
                    "type": 1,
                    "inputTips": null,
                    "maxLength": null,
                    "defaultValue": null,
                    "isUnique": null,
                    "isNull": null,
                    "options": null,
                    "fieldType": null,
                    "operating": null,
                    "companyId": null,
                    "setting": [],
                    "authLevel": null,
                    "value": null,
                    "sysInformation": null,
                    "isOut": 0,
                    "isHidden": null,
                    "autoGeneNumber": null,
                    "fieldDataId": null,
                    "sorting": null,
                    "stylePercent": null,
                    "maxNumRestrict": null,
                    "minNumRestrict": null,
                    "precisions": null,
                    "formPosition": null,
                    "formAssistId": null,
                    "optionsData": null,
                    "fieldExtendList": null,
                    "remark": null,
                    "isPhotograph": null,
                    "languageKeyMap": {
                        "name_resourceKey": "customField.leads.leadsName"
                    },
                    "xaxis": null,
                    "yaxis": null
                },
                {
                    "fieldId": null,
                    "parentFieldId": null,
                    "label": null,
                    "fieldName": "email",
                    "formType": "text",
                    "name": "邮箱",
                    "type": 1,
                    "inputTips": null,
                    "maxLength": null,
                    "defaultValue": null,
                    "isUnique": null,
                    "isNull": null,
                    "options": null,
                    "fieldType": null,
                    "operating": null,
                    "companyId": null,
                    "setting": [],
                    "authLevel": null,
                    "value": null,
                    "sysInformation": null,
                    "isOut": 1,
                    "isHidden": null,
                    "autoGeneNumber": null,
                    "fieldDataId": null,
                    "sorting": null,
                    "stylePercent": null,
                    "maxNumRestrict": null,
                    "minNumRestrict": null,
                    "precisions": null,
                    "formPosition": null,
                    "formAssistId": null,
                    "optionsData": null,
                    "fieldExtendList": null,
                    "remark": null,
                    "isPhotograph": null,
                    "languageKeyMap": {
                        "name_resourceKey": "customField.leads.email"
                    },
                    "xaxis": null,
                    "yaxis": null
                },
                {
                    "fieldId": null,
                    "parentFieldId": null,
                    "label": null,
                    "fieldName": "mobile",
                    "formType": "mobile",
                    "name": "手机",
                    "type": 7,
                    "inputTips": null,
                    "maxLength": null,
                    "defaultValue": null,
                    "isUnique": null,
                    "isNull": null,
                    "options": null,
                    "fieldType": null,
                    "operating": null,
                    "companyId": null,
                    "setting": [],
                    "authLevel": null,
                    "value": null,
                    "sysInformation": null,
                    "isOut": 1,
                    "isHidden": null,
                    "autoGeneNumber": null,
                    "fieldDataId": null,
                    "sorting": null,
                    "stylePercent": null,
                    "maxNumRestrict": null,
                    "minNumRestrict": null,
                    "precisions": null,
                    "formPosition": null,
                    "formAssistId": null,
                    "optionsData": null,
                    "fieldExtendList": null,
                    "remark": null,
                    "isPhotograph": null,
                    "languageKeyMap": {
                        "name_resourceKey": "customField.leads.mobile"
                    },
                    "xaxis": null,
                    "yaxis": null
                },
                {
                    "fieldId": null,
                    "parentFieldId": null,
                    "label": null,
                    "fieldName": "telephone",
                    "formType": "text",
                    "name": "电话",
                    "type": 1,
                    "inputTips": null,
                    "maxLength": null,
                    "defaultValue": null,
                    "isUnique": null,
                    "isNull": null,
                    "options": null,
                    "fieldType": null,
                    "operating": null,
                    "companyId": null,
                    "setting": [],
                    "authLevel": null,
                    "value": null,
                    "sysInformation": null,
                    "isOut": 0,
                    "isHidden": null,
                    "autoGeneNumber": null,
                    "fieldDataId": null,
                    "sorting": null,
                    "stylePercent": null,
                    "maxNumRestrict": null,
                    "minNumRestrict": null,
                    "precisions": null,
                    "formPosition": null,
                    "formAssistId": null,
                    "optionsData": null,
                    "fieldExtendList": null,
                    "remark": null,
                    "isPhotograph": null,
                    "languageKeyMap": {
                        "name_resourceKey": "customField.leads.telephone"
                    },
                    "xaxis": null,
                    "yaxis": null
                },
                {
                    "fieldId": null,
                    "parentFieldId": null,
                    "label": null,
                    "fieldName": "address",
                    "formType": "position",
                    "name": "地址",
                    "type": 43,
                    "inputTips": null,
                    "maxLength": null,
                    "defaultValue": null,
                    "isUnique": null,
                    "isNull": null,
                    "options": null,
                    "fieldType": null,
                    "operating": null,
                    "companyId": null,
                    "setting": null,
                    "authLevel": null,
                    "value": null,
                    "sysInformation": null,
                    "isOut": 1,
                    "isHidden": null,
                    "autoGeneNumber": null,
                    "fieldDataId": null,
                    "sorting": null,
                    "stylePercent": null,
                    "maxNumRestrict": null,
                    "minNumRestrict": null,
                    "precisions": 1,
                    "formPosition": null,
                    "formAssistId": null,
                    "optionsData": null,
                    "fieldExtendList": null,
                    "remark": null,
                    "isPhotograph": null,
                    "languageKeyMap": {
                        "name_resourceKey": "customField.leads.address"
                    },
                    "xaxis": null,
                    "yaxis": null
                },
                {
                    "fieldId": null,
                    "parentFieldId": null,
                    "label": null,
                    "fieldName": "nextTime",
                    "formType": "datetime",
                    "name": "下次联系时间",
                    "type": 13,
                    "inputTips": null,
                    "maxLength": null,
                    "defaultValue": null,
                    "isUnique": null,
                    "isNull": null,
                    "options": null,
                    "fieldType": null,
                    "operating": null,
                    "companyId": null,
                    "setting": [],
                    "authLevel": null,
                    "value": null,
                    "sysInformation": null,
                    "isOut": 0,
                    "isHidden": null,
                    "autoGeneNumber": null,
                    "fieldDataId": null,
                    "sorting": null,
                    "stylePercent": null,
                    "maxNumRestrict": null,
                    "minNumRestrict": null,
                    "precisions": null,
                    "formPosition": null,
                    "formAssistId": null,
                    "optionsData": null,
                    "fieldExtendList": null,
                    "remark": null,
                    "isPhotograph": null,
                    "languageKeyMap": {
                        "name_resourceKey": "customField.leads.nextTime"
                    },
                    "xaxis": null,
                    "yaxis": null
                },
                {
                    "fieldId": null,
                    "parentFieldId": null,
                    "label": null,
                    "fieldName": "remark",
                    "formType": "textarea",
                    "name": "备注",
                    "type": 2,
                    "inputTips": null,
                    "maxLength": null,
                    "defaultValue": null,
                    "isUnique": null,
                    "isNull": null,
                    "options": null,
                    "fieldType": null,
                    "operating": null,
                    "companyId": null,
                    "setting": [],
                    "authLevel": null,
                    "value": null,
                    "sysInformation": null,
                    "isOut": 0,
                    "isHidden": null,
                    "autoGeneNumber": null,
                    "fieldDataId": null,
                    "sorting": null,
                    "stylePercent": null,
                    "maxNumRestrict": null,
                    "minNumRestrict": null,
                    "precisions": null,
                    "formPosition": null,
                    "formAssistId": null,
                    "optionsData": null,
                    "fieldExtendList": null,
                    "remark": null,
                    "isPhotograph": null,
                    "languageKeyMap": {
                        "name_resourceKey": "customField.leads.remark"
                    },
                    "xaxis": null,
                    "yaxis": null
                },
                {
                    "fieldId": null,
                    "parentFieldId": null,
                    "label": null,
                    "fieldName": "ownerUserId",
                    "formType": "user",
                    "name": "负责人",
                    "type": 10,
                    "inputTips": null,
                    "maxLength": null,
                    "defaultValue": [],
                    "isUnique": null,
                    "isNull": null,
                    "options": null,
                    "fieldType": null,
                    "operating": null,
                    "companyId": null,
                    "setting": null,
                    "authLevel": null,
                    "value": null,
                    "sysInformation": null,
                    "isOut": 0,
                    "isHidden": null,
                    "autoGeneNumber": null,
                    "fieldDataId": null,
                    "sorting": null,
                    "stylePercent": null,
                    "maxNumRestrict": null,
                    "minNumRestrict": null,
                    "precisions": null,
                    "formPosition": null,
                    "formAssistId": null,
                    "optionsData": null,
                    "fieldExtendList": null,
                    "remark": null,
                    "isPhotograph": null,
                    "languageKeyMap": {
                        "name_resourceKey": "customField.leads.ownerUserName"
                    },
                    "xaxis": null,
                    "yaxis": null
                },
                {
                    "fieldId": null,
                    "parentFieldId": null,
                    "label": null,
                    "fieldName": "ownerDeptId",
                    "formType": "structure",
                    "name": "所属部门",
                    "type": 12,
                    "inputTips": null,
                    "maxLength": null,
                    "defaultValue": null,
                    "isUnique": null,
                    "isNull": null,
                    "options": null,
                    "fieldType": 1,
                    "operating": null,
                    "companyId": null,
                    "setting": [],
                    "authLevel": null,
                    "value": null,
                    "sysInformation": null,
                    "isOut": 0,
                    "isHidden": null,
                    "autoGeneNumber": null,
                    "fieldDataId": null,
                    "sorting": null,
                    "stylePercent": null,
                    "maxNumRestrict": null,
                    "minNumRestrict": null,
                    "precisions": null,
                    "formPosition": null,
                    "formAssistId": null,
                    "optionsData": null,
                    "fieldExtendList": null,
                    "remark": null,
                    "isPhotograph": null,
                    "languageKeyMap": {
                        "name_resourceKey": "customField.leads.ownerDeptName"
                    },
                    "xaxis": null,
                    "yaxis": null
                },
                {
                    "fieldId": null,
                    "parentFieldId": null,
                    "label": null,
                    "fieldName": "createUserId",
                    "formType": "user",
                    "name": "创建人",
                    "type": 10,
                    "inputTips": null,
                    "maxLength": null,
                    "defaultValue": null,
                    "isUnique": null,
                    "isNull": null,
                    "options": null,
                    "fieldType": 1,
                    "operating": null,
                    "companyId": null,
                    "setting": [],
                    "authLevel": null,
                    "value": null,
                    "sysInformation": null,
                    "isOut": 0,
                    "isHidden": null,
                    "autoGeneNumber": null,
                    "fieldDataId": null,
                    "sorting": null,
                    "stylePercent": null,
                    "maxNumRestrict": null,
                    "minNumRestrict": null,
                    "precisions": null,
                    "formPosition": null,
                    "formAssistId": null,
                    "optionsData": null,
                    "fieldExtendList": null,
                    "remark": null,
                    "isPhotograph": null,
                    "languageKeyMap": {
                        "name_resourceKey": "customField.leads.createUserName"
                    },
                    "xaxis": null,
                    "yaxis": null
                },
                {
                    "fieldId": null,
                    "parentFieldId": null,
                    "label": null,
                    "fieldName": "updateTime",
                    "formType": "datetime",
                    "name": "更新时间",
                    "type": 13,
                    "inputTips": null,
                    "maxLength": null,
                    "defaultValue": null,
                    "isUnique": null,
                    "isNull": null,
                    "options": null,
                    "fieldType": 1,
                    "operating": null,
                    "companyId": null,
                    "setting": [],
                    "authLevel": null,
                    "value": null,
                    "sysInformation": null,
                    "isOut": 0,
                    "isHidden": null,
                    "autoGeneNumber": null,
                    "fieldDataId": null,
                    "sorting": null,
                    "stylePercent": null,
                    "maxNumRestrict": null,
                    "minNumRestrict": null,
                    "precisions": null,
                    "formPosition": null,
                    "formAssistId": null,
                    "optionsData": null,
                    "fieldExtendList": null,
                    "remark": null,
                    "isPhotograph": null,
                    "languageKeyMap": {
                        "name_resourceKey": "customField.leads.updateTime"
                    },
                    "xaxis": null,
                    "yaxis": null
                },
                {
                    "fieldId": null,
                    "parentFieldId": null,
                    "label": null,
                    "fieldName": "createTime",
                    "formType": "datetime",
                    "name": "创建时间",
                    "type": 13,
                    "inputTips": null,
                    "maxLength": null,
                    "defaultValue": null,
                    "isUnique": null,
                    "isNull": null,
                    "options": null,
                    "fieldType": 1,
                    "operating": null,
                    "companyId": null,
                    "setting": [],
                    "authLevel": null,
                    "value": null,
                    "sysInformation": null,
                    "isOut": 0,
                    "isHidden": null,
                    "autoGeneNumber": null,
                    "fieldDataId": null,
                    "sorting": null,
                    "stylePercent": null,
                    "maxNumRestrict": null,
                    "minNumRestrict": null,
                    "precisions": null,
                    "formPosition": null,
                    "formAssistId": null,
                    "optionsData": null,
                    "fieldExtendList": null,
                    "remark": null,
                    "isPhotograph": null,
                    "languageKeyMap": {
                        "name_resourceKey": "customField.leads.createTime"
                    },
                    "xaxis": null,
                    "yaxis": null
                },
                {
                    "fieldId": null,
                    "parentFieldId": null,
                    "label": null,
                    "fieldName": "flowName",
                    "formType": "business_cause",
                    "name": "阶段流程",
                    "type": 22,
                    "inputTips": null,
                    "maxLength": null,
                    "defaultValue": null,
                    "isUnique": null,
                    "isNull": null,
                    "options": null,
                    "fieldType": 1,
                    "operating": null,
                    "companyId": null,
                    "setting": [],
                    "authLevel": null,
                    "value": null,
                    "sysInformation": null,
                    "isOut": 0,
                    "isHidden": null,
                    "autoGeneNumber": null,
                    "fieldDataId": null,
                    "sorting": null,
                    "stylePercent": null,
                    "maxNumRestrict": null,
                    "minNumRestrict": null,
                    "precisions": null,
                    "formPosition": null,
                    "formAssistId": null,
                    "optionsData": null,
                    "fieldExtendList": null,
                    "remark": null,
                    "isPhotograph": null,
                    "languageKeyMap": {
                        "name_resourceKey": "customField.leads.flowName"
                    },
                    "xaxis": null,
                    "yaxis": null
                },
                {
                    "fieldId": null,
                    "parentFieldId": null,
                    "label": null,
                    "fieldName": "lastTime",
                    "formType": "datetime",
                    "name": "最后跟进时间",
                    "type": 13,
                    "inputTips": null,
                    "maxLength": null,
                    "defaultValue": null,
                    "isUnique": null,
                    "isNull": null,
                    "options": null,
                    "fieldType": 1,
                    "operating": null,
                    "companyId": null,
                    "setting": [],
                    "authLevel": null,
                    "value": null,
                    "sysInformation": null,
                    "isOut": 0,
                    "isHidden": null,
                    "autoGeneNumber": null,
                    "fieldDataId": null,
                    "sorting": null,
                    "stylePercent": null,
                    "maxNumRestrict": null,
                    "minNumRestrict": null,
                    "precisions": null,
                    "formPosition": null,
                    "formAssistId": null,
                    "optionsData": null,
                    "fieldExtendList": null,
                    "remark": null,
                    "isPhotograph": null,
                    "languageKeyMap": {
                        "name_resourceKey": "customField.leads.lastTime"
                    },
                    "xaxis": null,
                    "yaxis": null
                },
                {
                    "fieldId": null,
                    "parentFieldId": null,
                    "label": null,
                    "fieldName": "source",
                    "formType": "select",
                    "name": "线索来源",
                    "type": 3,
                    "inputTips": null,
                    "maxLength": null,
                    "defaultValue": null,
                    "isUnique": null,
                    "isNull": null,
                    "options": "促销,搜索引擎,广告,转介绍,线上注册,线上询价,预约上门,陌拜,电话咨询,邮件咨询",
                    "fieldType": null,
                    "operating": null,
                    "companyId": null,
                    "setting": [
                        "促销",
                        "搜索引擎",
                        "广告",
                        "转介绍",
                        "线上注册",
                        "线上询价",
                        "预约上门",
                        "陌拜",
                        "电话咨询",
                        "邮件咨询"
                    ],
                    "authLevel": null,
                    "value": null,
                    "sysInformation": null,
                    "isOut": 0,
                    "isHidden": null,
                    "autoGeneNumber": null,
                    "fieldDataId": null,
                    "sorting": null,
                    "stylePercent": null,
                    "maxNumRestrict": null,
                    "minNumRestrict": null,
                    "precisions": null,
                    "formPosition": null,
                    "formAssistId": null,
                    "optionsData": null,
                    "fieldExtendList": null,
                    "remark": null,
                    "isPhotograph": null,
                    "languageKeyMap": {
                        "0": "customField.leads.sourceOptions.促销",
                        "1": "customField.leads.sourceOptions.搜索引擎",
                        "2": "customField.leads.sourceOptions.广告",
                        "3": "customField.leads.sourceOptions.转介绍",
                        "4": "customField.leads.sourceOptions.线上注册",
                        "5": "customField.leads.sourceOptions.线上询价",
                        "6": "customField.leads.sourceOptions.预约上门",
                        "7": "customField.leads.sourceOptions.陌拜",
                        "8": "customField.leads.sourceOptions.电话咨询",
                        "9": "customField.leads.sourceOptions.邮件咨询",
                        "name_resourceKey": "customField.leads.source"
                    },
                    "xaxis": null,
                    "yaxis": null
                },
                {
                    "fieldId": null,
                    "parentFieldId": null,
                    "label": null,
                    "fieldName": "industry",
                    "formType": "select",
                    "name": "客户行业",
                    "type": 3,
                    "inputTips": null,
                    "maxLength": null,
                    "defaultValue": null,
                    "isUnique": null,
                    "isNull": null,
                    "options": "IT,金融业,房地产,商业服务,运输/物流,生产,政府,文化传媒",
                    "fieldType": null,
                    "operating": null,
                    "companyId": null,
                    "setting": [
                        "IT",
                        "金融业",
                        "房地产",
                        "商业服务",
                        "运输/物流",
                        "生产",
                        "政府",
                        "文化传媒"
                    ],
                    "authLevel": null,
                    "value": null,
                    "sysInformation": null,
                    "isOut": 0,
                    "isHidden": null,
                    "autoGeneNumber": null,
                    "fieldDataId": null,
                    "sorting": null,
                    "stylePercent": null,
                    "maxNumRestrict": null,
                    "minNumRestrict": null,
                    "precisions": null,
                    "formPosition": null,
                    "formAssistId": null,
                    "optionsData": null,
                    "fieldExtendList": null,
                    "remark": null,
                    "isPhotograph": null,
                    "languageKeyMap": {
                        "0": "customField.leads.industryOptions.IT",
                        "1": "customField.leads.industryOptions.金融业",
                        "2": "customField.leads.industryOptions.房地产",
                        "3": "customField.leads.industryOptions.商业服务",
                        "4": "customField.leads.industryOptions.运输/物流",
                        "5": "customField.leads.industryOptions.生产",
                        "6": "customField.leads.industryOptions.政府",
                        "7": "customField.leads.industryOptions.文化传媒",
                        "name_resourceKey": "customField.leads.industry"
                    },
                    "xaxis": null,
                    "yaxis": null
                },
                {
                    "fieldId": null,
                    "parentFieldId": null,
                    "label": null,
                    "fieldName": "level",
                    "formType": "select",
                    "name": "客户级别",
                    "type": 3,
                    "inputTips": null,
                    "maxLength": null,
                    "defaultValue": null,
                    "isUnique": null,
                    "isNull": null,
                    "options": "A（重点客户）,B（普通客户）,C（非优先客户）",
                    "fieldType": null,
                    "operating": null,
                    "companyId": null,
                    "setting": [
                        "A（重点客户）",
                        "B（普通客户）",
                        "C（非优先客户）"
                    ],
                    "authLevel": null,
                    "value": null,
                    "sysInformation": null,
                    "isOut": 0,
                    "isHidden": null,
                    "autoGeneNumber": null,
                    "fieldDataId": null,
                    "sorting": null,
                    "stylePercent": null,
                    "maxNumRestrict": null,
                    "minNumRestrict": null,
                    "precisions": null,
                    "formPosition": null,
                    "formAssistId": null,
                    "optionsData": null,
                    "fieldExtendList": null,
                    "remark": null,
                    "isPhotograph": null,
                    "languageKeyMap": {
                        "0": "customField.leads.levelOptions.A（重点客户）",
                        "1": "customField.leads.levelOptions.B（普通客户）",
                        "2": "customField.leads.levelOptions.C（非优先客户）",
                        "name_resourceKey": "customField.leads.level"
                    },
                    "xaxis": null,
                    "yaxis": null
                },
                {
                    "fieldId": null,
                    "parentFieldId": null,
                    "label": null,
                    "fieldName": "tagZdybq",
                    "formType": null,
                    "name": "自定义标签",
                    "type": 61,
                    "inputTips": null,
                    "maxLength": null,
                    "defaultValue": null,
                    "isUnique": null,
                    "isNull": null,
                    "options": null,
                    "fieldType": null,
                    "operating": null,
                    "companyId": null,
                    "setting": null,
                    "authLevel": null,
                    "value": null,
                    "sysInformation": null,
                    "isOut": 0,
                    "isHidden": null,
                    "autoGeneNumber": null,
                    "fieldDataId": null,
                    "sorting": null,
                    "stylePercent": null,
                    "maxNumRestrict": null,
                    "minNumRestrict": null,
                    "precisions": null,
                    "formPosition": null,
                    "formAssistId": null,
                    "optionsData": null,
                    "fieldExtendList": null,
                    "remark": null,
                    "isPhotograph": null,
                    "languageKeyMap": {
                        "name_resourceKey": "customField.leads.tagZdybq"
                    },
                    "xaxis": null,
                    "yaxis": null
                }
            ]
        }
          const resData = res.data || []
          // 忽略的字段 不用于筛选
          if (this.props && this.props.ignoreFilterFields) {
            const { ignoreFilterFields } = this.props
            this.filterFieldList = resData.filter(item => !ignoreFilterFields.includes(item.fieldName))
          } else {
            this.filterFieldList = resData
          }
          resolve(this.filterFieldList)
        }).catch(() => { })
      })
    },
  }
}